suppressPackageStartupMessages({
library(tidyverse)
library(readODS)
library(gt) })
Warning: package 'readODS' was built under R version 4.4.3
Alex Koiter
In [1]:
suppressPackageStartupMessages({
library(tidyverse)
library(readODS)
library(gt) })
Warning: package 'readODS' was built under R version 4.4.3
In [2]:
<- read_ods(here::here("./notebooks/semivariogram.ods")) %>%
vario = p_sill + nugget,
mutate(sill /(C + Co) (%)` = 100 * p_sill/sill,
`C= case_when(`C/(C + Co) (%)` > 75 ~ "Strong",
`Spatial Class` /(C + Co) (%)`<=75 & `C/(C + Co) (%)` >25 ~ "Moderate",
`C/(C + Co) (%)` < 0.25 ~ "Low")) %>%
`C"Property" = "property", "Kriging Type" = "model", "Nugget (Co)" = "nugget", "Sill (Co + C)" = "sill", "C/(C + Co) (%)", "Range (m)" = "range", "site", "r2", "Spatial Class") %>%
select(#select(-p_sill) %>%
= fct_relevel(Property, "Ca", "Co", "Cs", "Fe", "Li", "La", "Nb", "Ni", "Rb", "Sr", "a*", "b*", "c*", "h*", "x")) %>%
mutate(Property arrange(Property)
In [3]:
In [4]:
|>
vario |>
group_by(site) |>
gt() = 1) |>
fmt_number(decimal = c("Range (m)", "C/(C + Co) (%)"), decimal = 0) |>
fmt_number(columns = "{{r^2}}") |>
cols_label(r2
tab_footnote(= "Models are all isotropic.",
footnote = cells_column_labels(columns = "Kriging Type")) |>
locations
tab_footnote(= "Strong spatial dependency (C/(C + Co) % >75); Moderate spatial dependency (C/(C + Co) % between 75 and 25); Low spatial dependency (C/(C + Co) % <25).",
footnote = cells_column_labels(columns = `Spatial Class`)) |>
locations = cell_text(weight = "bold", align = "center"), locations = cells_row_groups()) |>
tab_style(style = "bold") tab_options(column_labels.font.weight
Property | Kriging Type1 | Nugget (Co) | Sill (Co + C) | C/(C + Co) (%) | Range (m) | r2 | Spatial Class2 |
---|---|---|---|---|---|---|---|
Agriculture | |||||||
Ca | Universal | 0.0 | 7.2 | 100 | 580 | 0.9 | Strong |
Co | Simple | 0.0 | 0.7 | 100 | 208 | 0.4 | Strong |
Cs | Ordinary | 0.0 | 0.0 | 100 | 210 | 0.5 | Strong |
Fe | Ordinary | 0.0 | 0.0 | 100 | 185 | 0.2 | Strong |
Li | Universal | 0.3 | 1.5 | 81 | 185 | 0.6 | Strong |
La | Simple | 0.4 | 1.0 | 56 | 308 | 0.5 | Moderate |
Nb | Universal | 0.0 | 0.0 | 91 | 210 | 0.7 | Strong |
Ni | Ordinary | 1.4 | 8.9 | 84 | 352 | 0.6 | Strong |
Rb | Ordinary | 1.4 | 27.6 | 95 | 551 | 0.9 | Strong |
Sr | Ordinary | 0.9 | 900.2 | 100 | 220 | 1.0 | Strong |
a* | Ordinary | 0.4 | 1.0 | 59 | 288 | 0.3 | Moderate |
b* | Simple | 0.2 | 0.9 | 83 | 199 | 0.3 | Strong |
c* | Simple | 0.1 | 0.9 | 87 | 199 | 0.3 | Strong |
h* | Simple | 0.0 | 1.1 | 100 | 185 | 0.2 | Strong |
x | Simple | 0.4 | 1.0 | 58 | 220 | 0.1 | Moderate |
Forest | |||||||
Ca | Ordinary | 1.6 | 2.7 | 41 | 269 | 0.2 | Moderate |
Co | Ordinary | 0.0 | 2.1 | 100 | 298 | 0.1 | Strong |
Cs | Ordinary | 0.0 | 0.0 | 83 | 237 | 0.2 | Strong |
Li | Ordinary | 0.0 | 0.8 | 100 | 222 | 0.3 | Strong |
La | Ordinary | 3.1 | 7.4 | 59 | 176 | 0.1 | Moderate |
Nb | Ordinary | 0.0 | 0.0 | 51 | 224 | 0.2 | Moderate |
Ni | Universal | 6.7 | 15.8 | 57 | 187 | 0.2 | Moderate |
Sr | Simple | 0.4 | 1.0 | 65 | 229 | 0.4 | Moderate |
h* | Universal | 0.0 | 0.0 | 100 | 230 | 0.3 | Strong |
1 Models are all isotropic. | |||||||
2 Strong spatial dependency (C/(C + Co) % >75); Moderate spatial dependency (C/(C + Co) % between 75 and 25); Low spatial dependency (C/(C + Co) % <25). |